<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Merchantshare/index')}">商户分享列表</a></li>
			<li><a href="{:U('Merchantshare/add')}">添加商户分享</a></li>
		</ul>
		<form class="well form-search" method="post" action="{:U('Merchantshare/index')}">
			标题:
			<input type="text" name="article_title" style="width: 130px;" value="{:I('request.article_title/s','')}" placeholder="请输入标题">
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="{:U('Merchantshare/index')}">清空</a>
		</form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>商户名称</th>
					<th>标题</th>
					<th width="50">{:L('STATUS')}</th>
					<th width="100">{:L('ACTIONS')}</th>
				</tr>
			</thead>
			<style>td{word-break:break-all;}</style>
			<tbody>
				<php>
					$article_statuses=array("0"=>"禁用","1"=>"启用");
				</php>
				<foreach name="list" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<foreach name="merchant" item="val">
						<if condition="$val['id'] eq $vo['merchant_id']">
							<td>{$val['name']}</td>
						</if>
					</foreach>
					<td>{$vo.article_title}</td>
					<td>{$article_statuses[$vo['use_flg']]}</td>
					<td>
						<a href='{:U("Merchantshare/edit",array("id"=>$vo["id"]))}'>{:L('EDIT')}</a> |
						<a class="js-ajax-delete" href="{:U('Merchantshare/delete',array('id'=>$vo['id']))}">{:L('DELETE')}</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>